package com.crm.service.impl;

import com.crm.domain.RulePool;
import com.crm.mapper.RulePoolMapper;
import com.crm.service.IRulePoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 线索池规则Service业务层处理
 * 
 * @author wgl
 * @date 2021-04-16
 */
@Service
public class RulePoolServiceImpl implements IRulePoolService 
{
    @Autowired
    private RulePoolMapper rulePoolMapper;

    /**
     * 查询线索池规则
     * 
     * @param id 线索池规则ID
     * @return 线索池规则
     */
    @Override
    public RulePool selectRulePoolById(Long id)
    {
        return rulePoolMapper.selectRulePoolById(id);
    }

    @Override
    public RulePool selectRulePoolByType(String type) {
        return rulePoolMapper.selectRulePoolByType(type);
    }

    /**
     * 查询线索池规则列表
     * 
     * @param RulePool 线索池规则
     * @return 线索池规则
     */
    @Override
    public List<RulePool> selectRulePoolList(RulePool RulePool)
    {
        return rulePoolMapper.selectRulePoolList(RulePool);
    }

    /**
     * 新增线索池规则
     * 
     * @param RulePool 线索池规则
     * @return 结果
     */
    @Override
    public int insertRulePool(RulePool RulePool)
    {
        return rulePoolMapper.insertRulePool(RulePool);
    }

    /**
     * 修改线索池规则
     * 
     * @param RulePool 线索池规则
     * @return 结果
     */
    @Override
    public int updateRulePool(RulePool RulePool)
    {
        return rulePoolMapper.updateRulePool(RulePool);
    }

    /**
     * 批量删除线索池规则
     * 
     * @param ids 需要删除的线索池规则ID
     * @return 结果
     */
    @Override
    public int deleteRulePoolByIds(Long[] ids)
    {
        return rulePoolMapper.deleteRulePoolByIds(ids);
    }

    /**
     * 删除线索池规则信息
     * 
     * @param id 线索池规则ID
     * @return 结果
     */
    @Override
    public int deleteRulePoolById(Long id)
    {
        return rulePoolMapper.deleteRulePoolById(id);
    }

    @Override
    public RulePool selectTbRulePoolByType(String type) {
        return rulePoolMapper.selectRulePoolByType(type);
    }
}
